Non-volatile storage of high resolution tape directory

ABSTRACT

An HRTD stored in the volatile memory of a tape drive is communicated for storage in an off-tape non-volatile memory prior to unloading a tape cartridge. In response to the tape cartridge being loaded into the tape drive, the HRTD is received from the off-tape non-volatile memory.

BACKGROUND

The present disclosure relates to tape-based data storage, and morespecifically, to High Resolution Tape Directory (HRTD) for a tape-baseddata storage.

Linear tape-open (LTO) tape drives and IBM enterprise tape drives(TS11xx) are called linear tape drives. A linear tape drive allocatesdata on a tape in a longitudinal direction and records the data from thebeginning of the tape to the end, then shifts the position slightly inthe lateral direction of the tape, and then records data to the tape inthe opposite longitudinal direction. The linear tape drive repeats thisreciprocating operation several times with shifting in the lateraldirection of the tape.

In the event of receiving a seek command, it is not a simple process forthe tape drive to move to the physical position of the target record.For example, when storing 10 TB of data as 128 KB records, 40,000,000records are necessary, and it is impossible to record the physicalpositions of all the records. In addition, unlike hard disk drives(HDDs), it is generally possible for a tape device to modify the recordlength of each record. For this reason, the physical positions cannot bedetermined with a simple calculation formula.

A seek operation includes moving the tape to the beginning of the areawhere the target record is present and reading records from thebeginning of the area until the target record is reached. Informationabout the area read during the seek operation is accumulated in thevolatile memory of the tape drive. This area information table is calledHigh Resolution Tape Directory (HRTD). The HRTD can be used to improveseek times for records that included in the HRTD.

TS11xx drives store the HRTD in a management area of the tape whenwriting records. However, in the case of an LTO drive, as the use of themanagement area of a tape is strictly defined by the LTO formatspecification, the HRTD is not allowed to be stored on the tape.Therefore, the LTO drive discards the HRTD in the volatile memory of thedrive when unloading the tape cartridge. For this reason, compared toTS11xx tape drives, LTO tape drives are generally slower in seeking arecord that has not been accessed since the cartridge has been loadedinto the tape drive.

SUMMARY

According to embodiments of the present disclosure, a method isprovided. The method includes reading a tape directory from a cartridgememory of a tape cartridge in a first tape drive. The method furtherincludes seeking a target record using the tape directory. Physicalpositions of a plurality of different records that have been read duringthe seeking are stored in a volatile memory of the first tape drive as ahigh resolution tape directory (HRTD). The HRTD stored in the volatilememory is communicated for storage in an off-tape non-volatile memoryprior to unloading the tape cartridge. In response to the tape cartridgebeing loaded into the tape drive, the HRTD is received from the off-tapenon-volatile memory. The method allows maintaining the HRTD topotentially increase seeking speed where the HRTD would otherwise havebeen discarded.

Optionally, when the off-tape non-volatile memory is part of a tapelibrary, the method further includes exporting the HRTD from theoff-tape non-volatile memory in response to the tape cartridge beingremoved from the tape library. This may allow the tape library to freestorage space for other uses while maintaining the HRTD.

Optionally, when the off-tape non-volatile memory is part of a tapelibrary, the method furthers include discarding the HRTD in the off-tapenon-volatile memory based on the tape cartridge being removed from thetape library. This may allow the tape library to free storage space forother users. Optionally, the discarding is further based on a specifiedperiod of time elapsing since the tape cartridge was removed from thetape library. This may allow the HRTD to maintained for a period of timeafter the tape cartridge is removed while still allowing the tapelibrary to free up storage space.

Optionally, the method further includes generating a hash code usingtape specific information, where the hash code is communicated with theHRTD for storing in the off-tape non-volatile memory. This may allow theHRTD to subsequently be verified to determine if it is valid for a tapecartridge. Optionally, when the hash code is received with the HRTD fromthe off-tape non-volatile memory, the method further includes verifyingthe hash code using tape specific information from the tape cartridge.This may prevent an invalid HRTD from being used based on a tapecartridge that does not correspond to the HRTD or a tape that has beenwritten to subsequent to the creation of the HRTD.

According to embodiments of the present disclosure, a tape drive isprovided. The tape drive includes a memory including a volatile memoryand a controller coupled to the memory. The controller is configured toperform operations from the method described above.

According to embodiments of the present disclosure, a system isprovided. The system includes a memory containing program instructionsand a processor coupled to the memory. The processor is configured toexecute the instructions to perform operations including: in response toreceiving a tape cartridge eject request for a tape cartridge in a tapedrive, requesting a high resolution tape directory (HRTD) from avolatile memory of the tape drive, and in response to receiving the HRTDfrom the tape drive, storing the HRTD in a non-volatile memory. Thesystem allows for maintaining the HRTD where the HRTD would otherwisehave been discarded.

Optionally, the operations further include receiving a tape cartridgeinsert request for inserting the tape cartridge into the tape drive andsending the HRTD stored in the non-volatile memory to the tape drive.This may allow the tape drive to perform faster seeking using the HRTD.

According to embodiments of the present disclosure, a tape library isprovided. The tape library includes a memory including a non-volatilememory and a controller coupled to the memory, the controller configuredto perform operations including in response to receiving a tapecartridge eject request for a tape cartridge in a tape drive, requestinga high resolution tape directory (HRTD) from a volatile memory of thetape drive, and in response to receiving the HRTD from the tape drive,storing the HRTD in the non-volatile memory. The tape library allows formaintaining the HRTD where the HRTD would otherwise have been discarded.

Optionally, the operations further include receiving a tape cartridgeinsert request for inserting the tape cartridge into the tape drive andsending the HRTD stored in the non-volatile memory to the tape drive.This may allow the tape drive to perform faster seeking using the HRTD.

Optionally, the operations further include discarding the HRTD inresponse to the tape cartridge being removed from the tape library anddetermining that remaining free storage capacity in the non-volatilememory is below a threshold value. This may allow the tape library tomaintain the HRTD when the tape cartridge has been removed whileallowing the tape library to free storage space when needed.

The above summary is not intended to describe each illustratedembodiment or every implementation of the present disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The drawings included in the present application are incorporated into,and form part of, the specification. They illustrate embodiments of thepresent disclosure and, along with the description, serve to explain theprinciples of the disclosure. The drawings are only illustrative ofcertain embodiments and do not limit the disclosure.

FIG. 1 depicts a tape storage system according to embodiments of thepresent disclosure.

FIG. 2 depicts a second tape storage environment according toembodiments of the present disclosure.

FIG. 3 depicts a flowchart of a method for handling the insertion of atape cartridge in a tape drive according to embodiments of the presentdisclosure.

FIG. 4 depicts a flowchart of a method for handling a tape eject requestis depicted according to embodiments of the present disclosure.

FIG. 5 depicts a method for operating a tape drive is depicted accordingto embodiments of the present disclosure.

FIG. 6 depicts a high-level block diagram of an example computer systemin accordance with embodiments of the present disclosure.

While the invention is amenable to various modifications and alternativeforms, specifics thereof have been shown by way of example in thedrawings and will be described in detail. It should be understood,however, that the intention is not to limit the invention to theparticular embodiments described. On the contrary, the intention is tocover all modifications, equivalents, and alternatives falling withinthe spirit and scope of the invention.

DETAILED DESCRIPTION

Aspects of the present disclosure relate to improving seek time in tapestorage, and more particular aspects relate to the storing of a HighResolution Tape Directory in non-volatile memory. While the presentdisclosure is not necessarily limited to such applications, variousaspects of the disclosure may be appreciated through a discussion ofvarious examples using this context.

Linear tape-open (LTO) tape drives and IBM enterprise tape drives(TS11xx) are called linear tape drives. A linear tape drive allocatesdata on a tape in a longitudinal direction and records the data from thebeginning of the tape to the end, then shifts the position slightly inthe lateral direction of the tape, and then records data to the tape inthe opposite longitudinal direction. The linear tape drive repeats thisreciprocating operation several times with shifting in the lateraldirection of the tape. The position where all the area of the tape hasbeen written is determined as the logical end of the tape.

In this operation, a linear line of data from the beginning to end ofthe tape or from the end to beginning is called a Wrap. The number ofWraps depends on type of cartridge and cartridge formats. In the casesof LTO and TS11xx tape drives, the number of Wraps ranges from 48 to208. The data write area of a tape is divided into four sections in thelateral direction, in each of which one-fourth of the Wraps is included.Each divided section is called a Data Band. The tape drive is recognizedas a streaming device by a computer connected to the tape drive and isgenerally operated via a Small Computer System Interface (SCSI) commandset.

The data on the tape drive is broadly classified logically into realdata (record) and separator (file mark: FM). The tape drive assignsnumbers sequentially to the logical data (records and FMs) written fromthe beginning. The tape drive holds current position information, whichcan be retrieved by a ReadPosition command. The tape drive providescommands for changing the current position (seek commands). Using theLocate, Space, and Rewind commands, the current position can be changed.Upon receipt of a seek command, LTO and TS11xx tape drives wind up thetape so as to position the head of the tape drive to a position of thetape where recording has been performed. Upon receipt of a Read command,the tape drive reads the logical data at the current position, transmitsthe data to the computer, and then increments the current position. Uponreceipt of a Write command, the tape drive writes the logical datareceived from the computer to the current position, increments thecurrent position, and then sets the current position as the end oflogical data (EOD). In other words, upon receipt of a Write command, thetape drive writes the logical data received from the computer to thecurrent position, increases increments the current position by 1, andthen invalidates the data succeeding the increased current position.

In response to receiving a seek command, the tape drive cannot simplymove to the physical position of the target record. For example, whenstoring 10 TB of data as 128 KB records, 40,000,000 records arenecessary, and it is impossible to record the physical positions of allthe records. In addition, unlike hard disk drives (HDDs), it isgenerally possible for a tape device to modify the record length of eachrecord. For this reason, the physical positions cannot be determinedwith a simple calculation formula.

LTO drives implement a standardized mechanism called Tape Directory(TD), which allows estimation of physical positions, and writes the TDinto a non-volatile memory in the cartridge as appropriate. In the caseof LTO, a TD stores the number of the records and the number of the FMswritten in the first half of each Wrap and the number of the records andthe number of the FMs written in the second half of each Wrap. In thecase of TS11xx, a TD stores the number of the records and the number ofthe FMs written in each Wrap. By consulting the TD, it is possible toknow the Wrap and an area thereof where the target record is present.

A seek operation includes moving the tape to the beginning of the areawhere the target record is present and reading records from thebeginning of the area until the target record is reached. Informationabout the area read during the seek operation is accumulated in thevolatile memory of the tape drive. The area information accumulated inthis operation is composed of the number of the records and the numberof the FMs written in the areas which are resulted by dividing each Wrapby a number from 32 to 128. This area information table is called HighResolution Tape Directory (HRTD).

TS11xx drives store the HRTD in a management area of the tape whenwriting records. However, in the case of an LTO drive, as the use of themanagement area of a tape is strictly defined by the LTO formatspecification, it is not allowed to store the HRTD on the tape.Therefore, the LTO drive discards the HRTD in the volatile memory of thedrive when unloading the tape cartridge. For this reason, compared toTS11xx tape drives, LTO tape drives are generally slower in seeking arecord that has not accessed since the cartridge has been inserted.

Methods, systems, and computer program products are described herein forstoring HRTD data in an off-tape non-volatile memory when a tapecartridge is unloaded from a tape drive. In embodiments, a hostcomputing device or a tape library reads the HRTD from the tape driveand stores it before unloading the tape cartridge. Then, when the tapecartridge is subsequently inserted into a tape drive, the host computingdevice or the tape library transmits the stored HRTD to the tape driveto allow the tape drive to use the previously produced HRTD data forsubsequent seeking. Thus, embodiments may be particularly beneficial fortape drives, such as LTO tape drives, that would otherwise not haveaccess to the HRTD as it is typically discarded upon the tape cartridgebeing unloaded from the tape drive. For example, it may provide an LTOdrive with the ability to seek to a record that has not been accessedsince the tape cartridge was inserted at a speed equivalent to that ofTS11xx drives. Additionally, embodiments may also provide a benefit toother types of tape drives by providing an alternative storage locationfor the HRTD, thus freeing up storage for other uses.

A command for retrieving an HRTD from a tape drive and a command forsending a stored HRTD to a tape drive may be provided. In someembodiments, the commands may be provided by defining a new page inexisting SCSI commands such as ModeSense and ModeSelect, or commandslike ReadBuffer and Write Buffer. Alternatively, the commands may beprovided by defining new vendor-unique commands. In the presentdisclosure, a command called GET_HRTD is used to refer to a command toretrieve an HRTD from a tape drive and a command called SET_HRTD is usedto refer to a command to send a stored HRTD to a tape drive.

The HRTD for a tape cartridge could become invalid if a tape issubsequently modified and the HRTD is not updated. In some embodiments,the tape drive additionally provides verification data based on tapespecific information at the time of providing the HRTD that can be usedto verify that the HRTD is valid. For example, the tape drive maygenerate a hash code using the tape specific information and provide thehash code with the HRTD. Tape specific information may includeinformation stored in a non-volatile memory of a tape cartridge thatdescribes the tape. For example, tape specific information may includean identifier such as a tape serial number that is created by themanufacturer and a write pass value indicating the number of writes thathave been tried on the tape.

The hash code may be generated using any suitable hashing algorithm. Theverification data may be used to prevent an incorrect HRTD from beingused when the tape has been modified since the HRTD was created. In someembodiments, the host computing device or tape library may provide theverification data to the tape drive with the HRTD and the tape drive maycheck the verification data with the tape specific information of theloaded tape cartridge. For example, the tape drive may calculate a newhash code based on the tape specific information (tape serial, writepass) and compare the new hash code to the hash code received from thehost computing device or tape library. If the tape serial number doesnot match or if the tape has been written to by another application tocause the write pass count to increase, the hash codes would not match,indicating that the HRTD is invalid.

In embodiments where the HRTD is stored by a tape library, the HRTD maybe maintained as long as the corresponding tape cartridge remains in thetape library. However, storage space in the tape library may be limitedsuch that HRTD data may need to be discarded at some point to free upstorage space. When the tape cartridge is removed from the tape library,the tape library may be configured to handle the corresponding HRTD indifferent ways.

In some embodiments, the HRTD is saved for a certain period of timeafter removal of the corresponding tape cartridge from the tape library.For example, the tape library may discard the HRTD after a specifiedperiod of time has elapsed since the corresponding tape cartridge wasremoved from the tape library. Alternatively, the tape library maydiscard the HRTD based on the remaining free storage capacity in thenon-volatile memory. For example, the tape library may discard the HRTDif the corresponding tape cartridge has been removed from the tapelibrary and the remaining free storage capacity is below a thresholdvalue. In some embodiments, a combination of the time elapsed since thecorresponding tape cartridge was removed and the remaining storagecapacity may be used. For example, the tape library may discard the HRTDif the remaining free storage capacity is below a threshold and aspecified period of time has elapsed since the corresponding tapecartridge was removed. To determine the period of time that has elapsedsince a tape cartridge was removed, the tape library may generate a timestamp when the tape cartridge is removed and store it in associationwith the corresponding HRTD.

In some embodiments, the tape library may export the HRTD when thecorresponding tape cartridge is removed from the tape library. Forexample, the tape library may be configured to communicate the HRTD to ahost computing device in communication with the tape library. The tapelibrary may be further configured to import the HRTD when thecorresponding tape cartridge is subsequently inserted. For example, thetape library may communicate a request for the HRTD to the hostcomputing device when the corresponding tape cartridge is inserted intothe tape library.

In some embodiments, the tape library may simply discard the HRTD whenthe corresponding tape cartridge is removed. While this frees up storagespace on the tape library, the benefits of retaining the HRTD may belost if the corresponding tape cartridge is subsequently inserted intothe tape library.

Referring now to FIG. 1, a tape storage system 100 is depicted accordingto embodiments of the present disclosure. Tape storage system 100includes a host computing device 110 and a tape drive 120. The hostcomputing device 110 may be communicatively coupled to tape drive 120via one or more interfaces. In some embodiments, host computing device110 may communicate with tape drive 120 over one or more networks.

Host computing device 110 may be any suitable computing device such as,for example, computer system 601 described in reference to FIG. 6. Hostcomputing device 110 includes a tape storage module 114 and nonvolatilememory 118. Tape storage module 114 may be any combination of hardwareand software components configured to communicate with tape drive 120.For example, tape storage module 114 may include program instructionsexecutable by a processor for communicating commands to tape drive 120and processing information received from tape drive 120. Host computingdevice 110 further includes a non-volatile memory 118. Non-volatilememory 118 may be any suitable non-volatile memory component thatretains information after having been power cycled. As described herein,non-volatile memory 118 may store HRTD data received from tape drive120.

Tape drive 120 may be any type of suitable tape drive. As mentionedpreviously, aspects of the present disclosure may be particularlybeneficial for tape drives, such as LTO tape drives, that are configuredto discard HRTD data when a tape cartridge is ejected, without storingthe data in a non-volatile memory. Tape drive 120 may include acontroller 124. Controller 124 may be or include a processor and/or anylogic for controlling any subsystem of tape drive 120. For example, thecontroller 124 typically controls head functions such as servofollowing, data writing, data reading, etc. The controller 124 mayoperate under logic known in the art, as well as any logic disclosedherein, and thus may be considered as a processor for any of thedescriptions of tape drives included herein, in various embodiments. Thecontroller 124 may be coupled to a memory 126 of any known type, whichmay store instructions executable by the controller 124. Moreover, thecontroller 124 may be configured and/or programmable to perform orcontrol some or all of the methodology presented herein. Thus, thecontroller 124 may be considered to be configured to perform variousoperations by way of logic programmed into one or more chips, modules,and/or blocks; software, firmware, and/or other instructions beingavailable to one or more processors; etc., and combinations thereof.

Memory 126 may be a combination of one or more memory devices. Memory126 includes volatile memory 128. Controller 124 may be configured tostore information in volatile memory 128 related to a tape cartridgethat is loaded in tape drive 120. For example, the controller may read aTD from the cartridge memory of the loaded tape cartridge and store theTD in volatile memory 128. Further, the controller may use the TD involatile memory 128 to perform seek commands and may store physicalpositions of records as an HRTD in volatile memory 128. Additionally,the controller may read tape specific information from the cartridgememory and use the information to generate verification data asdescribed herein.

Referring now to FIG. 2, a second tape storage environment 200 isdepicted according to embodiments of the present disclosure. Environment200 includes a host computing device 210 and a tape library 220. Thehost computing device 210 may be communicatively coupled to tape library220 via one or more interfaces. In some embodiments, host computingdevice 210 may communicate with tape library 220 over one or morenetworks.

Host computing device 210 may be any suitable computing device such as,for example, computer system 601 described in reference to FIG. 6. Hostcomputing device 210 includes a tape library storage module 214 andnonvolatile memory 218. Tape library storage module 214 may be anycombination of hardware and software components configured tocommunicate with tape library 220. For example, tape library storagemodule 214 may include program instructions executable by a processorfor communicating commands to tape library 220 and processinginformation received from a tape library 220. Host computing device 210further includes a non-volatile memory 218. Non-volatile memory 218 maybe any suitable non-volatile memory component that retains informationafter having been power cycled. As described herein, non-volatile memory218 may store HRTD data exported from Tape Library 220.

Tape library 220 includes controller 224, memory 226, tape cartridgeslots 230, and tape drive 240. Controller 224 may be or include aprocessor and/or any logic for controlling any subsystem of tape library220. For example, the controller 224 may control the transfer of tapecartridges between tape cartridge slots 230 and tape drive 240. Thecontroller 124 may operate under logic known in the art, as well as anylogic disclosed herein, and thus may be considered as a processor forany of the descriptions of tape drives included herein, in variousembodiments. The controller 224 may be coupled to a memory 226 of anyknown type, which may store instructions executable by the controller224. Moreover, the controller 224 may be configured and/or programmableto perform or control some or all of the methodology presented herein.Thus, the controller 224 may be considered to be configured to performvarious operations by way of logic programmed into one or more chips,modules, and/or blocks; software, firmware, and/or other instructionsbeing available to one or more processors; etc., and combinationsthereof.

Memory 226 includes a non-volatile memory 228. Non-volatile memory 228may be any suitable non-volatile memory component that retainsinformation after having been power cycled. As described herein,non-volatile memory 228 may store HRTD data received from tape drive240.

Tape cartridge slots 230 may include any number of slots for holdingtape cartridges within tape library 220. Tape library 220 may beconfigured to automatically remove a tape cartridge from one of the tapecartridge slots 230 and insert it into tape drive 240. Tape library 220may be further configured to eject a tape cartridge from tape drive 240and insert it into one of the tape cartridge slots 230.

Tape drive 240 may include a controller 244. Controller 244 may be orinclude a processor and/or any logic for controlling any subsystem oftape drive 240. For example, the controller 244 typically controls headfunctions such as servo following, data writing, data reading, etc. Thecontroller 244 may operate under logic known in the art, as well as anylogic disclosed herein, and thus may be considered as a processor forany of the descriptions of tape drives included herein, in variousembodiments. The controller 244 may be coupled to a memory 246 of anyknown type, which may store instructions executable by the controller244. Moreover, the controller 244 may be configured and/or programmableto perform or control some or all of the methodology presented herein.Thus, the controller 244 may be considered to be configured to performvarious operations by way of logic programmed into one or more chips,modules, and/or blocks; software, firmware, and/or other instructionsbeing available to one or more processors; etc., and combinationsthereof.

Memory 246 may be a combination of one or more memory devices. Memory246 includes volatile memory 248. Controller 244 may be configured tostore information in volatile memory 248 related to a tape cartridgethat is loaded in tape drive 240. For example, the controller may readTD from the cartridge memory of the loaded tape cartridge and store theTD in volatile memory 248. Further, the controller may use the TD involatile memory 248 to perform seek commands and may store physicalpositions of records as an HRTD in volatile memory 248. Additionally,the controller may read tape specific information from the cartridgememory and use the information to generate verification data asdescribed herein. While tape library 220 is depicted as having a singletape drive, the tape library could have any number of tape drives.

Referring now to FIG. 3, a flowchart of a method 300 for handling theinsertion of a tape cartridge in a tape drive according to embodimentsof the present disclosure. Some or all of method 300 may be performed bya host computing device. For example, method 300 may be performed bytape storage module 114 of host computing device 110 described inreference to FIG. 1 or tape library storage module 214 of host computingdevice 210 described in reference to FIG. 1. FIG. 3 will be describedherein as being performed by a host computing device; however, in someembodiments, some or all of method 300 may be performed by tape library220. For example, program instructions for performing method 300 may beincluded in memory 246 for execution by controller 224 in tape library220.

At operation 310, a tape cartridge insert request is received by thehost computing device. For example, the host computing device may benotified that a tape cartridge has been inserted into a tape drive. Atape cartridge insert request may occur in response to manual insertionof a tape cartridge into the tape drive by a user or by an automatedprocess of a tape library. At operation 320, the host computing devicedetermines whether an HRTD is stored in non-volatile memory thatcorresponds to the tape cartridge. In some embodiments, the hostcomputing device searches HRTD data in a non-volatile memory on the hostcomputing device using an identifier for the tape cartridge. The HRTDdata may include a plurality of HRTDs corresponding to a plurality oftape drives. The host computing device may identify a corresponding HRTDusing a tape identifier such as a serial number. In some embodiments,the host computing device searches HRTD data stored in non-volatilememory in a tape library holding the tape drive.

If, at operation 320, an HRTD corresponding to the tape cartridge isavailable, the HRTD is sent to the tape drive at operation 330. Forexample, the host computing device may read the HRTD from non-volatilememory and communicate the HRTD to the tape drive using a SET_HRTDcommand to store the HRTD in the volatile memory of the tape drive.

After sending the HRTD to the tape drive at operation 330, or afterdetermining that an HRTD corresponding to the tape cartridge is notavailable at operation 320, the tape cartridge insertion is finished atoperation 340 to allow commands to be performed on the tape.

Referring now to FIG. 4, a flowchart of a method 400 for handling a tapeeject request is depicted according to embodiments of the presentdisclosure. Some or all of method 400 may be performed by a hostcomputing device. For example, method 400 may be performed by tapestorage module 114 of host computing device 110 described in referenceto FIG. 1 or tape library storage module 214 of host computing device210 described in reference to FIG. 1. FIG. 4 will be described herein asbeing performed by a host computing device; however, in someembodiments, some or all of method 400 may be performed by tape library220. For example, program instructions for performing method 400 may beincluded in memory 246 for execution by controller 224 in tape library220.

At operation 410, a tape cartridge eject request is received by a hostcomputing device. The eject request may occur in response to the manualaction by a user or an automated action by a tape library. At operation420, the host computing device requests the HRTD corresponding to thetape cartridge from the tape drive. For example, the host computingdevice may issue a GET_HRTD command to the tape drive. In response tothe request, the tape drive may read the HRTD from its volatile memoryand communicate it to the host computing device or tape library.

At operation 430, the host computing device saves the HRTD received fromthe tape drive in a non-volatile memory. In some embodiments, thenon-volatile memory is on the host computing device. In someembodiments, the non-volatile memory is on a tape library holding thetape drive. The non-volatile memory may store HRTDs for a plurality ofdifferent tape cartridges. The HRTDs may be stored with an identifiersuch as a tape serial number to identify the corresponding tapecartridge. In some embodiments, the HRTDs are stored with verificationdata received from the tape drive or generated by the host computingdevice. At operation 440, the host computing device issues an unloadcommand to the tape drive.

Referring now to FIG. 5, a method 500 for operating a tape drive isdepicted according to embodiments of the present disclosure. Method 500may be performed by a controller of a tape drive such as controller 124of tape drive 120 described in reference to FIG. 1 or controller 244 oftape drive 240 described in reference to FIG. 2.

At operation 510, a tape drive receives a tape cartridge. For example, atape cartridge may be manually inserted into the tape drive by a user ora tape cartridge may be automatically inserted by a tape library. Thetape drive may be configured to read a tape cartridge identifier such asa serial number from a cartridge memory of the tape cartridge andcommunicate the identifier to a host computing device. At operation 520,the tape drive reads a tape directory from the cartridge memory of thetape drive. The tape drive may store the tape directory in its volatilememory.

At operation 530, an HRTD is received by the tape drive and stored inits volatile memory. The HRTD may be communicated to the tape drive froma nonvolatile memory of a host computing device or tape library using,for example, a SET_HRTD command. In some embodiments, the received HRTDis accompanied by verification data such as a hash code produced usingtape specific information. The tape drive may be configured to verifythe hash code using tape specific information from the tape cartridge.For example, the tape drive may calculate a new hash code and determinewhether it matches the received hash code. If the hash code is notverified, the HRTD may be discarded by the tape drive. If an HRTD forthe tape cartridge has not previously been generated, operation 530 maynot occur.

At operation 540, the tape drive seeks to a target record using the tapedirectory and/or the HRTD. Operation 540 may occur in response toreceiving a seek command from a host computing device or a tape library.A seek operation may include moving the tape to the beginning of thearea where the target record is present based on the tape directory andreading records from the beginning of the area until the target recordis reached.

At operation 550, HRTD data is stored in the volatile memory of the tapedrive using the physical positions of records identified during theseeking in operation 540. A new HRTD may be created if an HRTD does notalready exist for the tape cartridge. Alternatively, the HRTD data maybe added to an existing HRTD.

At operation 560, the tape drive receives a request for the HRTD. Forexample, the tape drive may receive a GET_HRTD command from a hostcomputing device in response to request to remove the tape cartridgefrom the tape drive.

At operation 570, the tape drive transmits the HRTD to the hostcomputing device or tape library for storing in a non-volatile memory.In some embodiments, the tape drive may generate verification data suchas a hash code using tape specific information (e.g., tape serial, writepass) and transmit the hash code along with the HRTD.

At operation 580, a tape cartridge unload command is received by thetape drive. At operation 590, the tape cartridge is unloaded from thetape drive.

Referring now to FIG. 6, shown is a high-level block diagram of anexample computer system 601 that may be used in implementing one or moreof the methods, tools, and modules, and any related functions, describedherein (e.g., using one or more processor circuits or computerprocessors of the computer), in accordance with embodiments of thepresent disclosure. In some embodiments, the major components of thecomputer system 601 may comprise one or more CPUs 602, a memorysubsystem 604, a terminal interface 612, a storage interface 616, an I/O(Input/Output) device interface 614, and a network interface 618, all ofwhich may be communicatively coupled, directly or indirectly, forinter-component communication via a memory bus 603, an I/O bus 608, andan I/O bus interface unit 610.

The computer system 601 may contain one or more general-purposeprogrammable central processing units (CPUs) 602A, 602B, 602C, and 602D,herein generically referred to as the CPU 602. In some embodiments, thecomputer system 601 may contain multiple processors typical of arelatively large system; however, in other embodiments the computersystem 601 may alternatively be a single CPU system. Each CPU 602 mayexecute instructions stored in the memory subsystem 604 and may includeone or more levels of on-board cache.

System memory 604 may include computer system readable media in the formof volatile memory, such as random access memory (RAM) 622 or cachememory 624. Computer system 601 may further include otherremovable/non-removable, volatile/non-volatile computer system storagemedia. By way of example only, storage system 626 can be provided forreading from and writing to a non-removable, non-volatile magneticmedia, such as a “hard drive.” Although not shown, a magnetic disk drivefor reading from and writing to a removable, non-volatile magnetic disk(e.g., a “floppy disk”), or an optical disk drive for reading from orwriting to a removable, non-volatile optical disc such as a CD-ROM,DVD-ROM or other optical media can be provided. In addition, memory 604can include flash memory, e.g., a flash memory stick drive or a flashdrive. Memory devices can be connected to memory bus 603 by one or moredata media interfaces. The memory 604 may include at least one programproduct having a set (e.g., at least one) of program modules that areconfigured to carry out the functions of various embodiments.

One or more programs/utilities 628, each having at least one set ofprogram modules 630 may be stored in memory 604. The programs/utilities628 may include a hypervisor (also referred to as a virtual machinemonitor), one or more operating systems, one or more applicationprograms, other program modules, and program data. Each of the operatingsystems, one or more application programs, other program modules, andprogram data or some combination thereof, may include an implementationof a networking environment. Program modules 630 generally perform thefunctions or methodologies of various embodiments.

Although the memory bus 603 is shown in FIG. 6 as a single bus structureproviding a direct communication path among the CPUs 602, the memorysubsystem 604, and the I/O bus interface 610, the memory bus 603 may, insome embodiments, include multiple different buses or communicationpaths, which may be arranged in any of various forms, such aspoint-to-point links in hierarchical, star or web configurations,multiple hierarchical buses, parallel and redundant paths, or any otherappropriate type of configuration. Furthermore, while the I/O businterface 610 and the I/O bus 608 are shown as single respective units,the computer system 601 may, in some embodiments, contain multiple I/Obus interface units 610, multiple I/O buses 608, or both. Further, whilemultiple I/O interface units are shown, which separate the I/O bus 608from various communications paths running to the various I/O devices, inother embodiments some or all of the I/O devices may be connecteddirectly to one or more system I/O buses.

In some embodiments, the computer system 601 may be a multi-usermainframe computer system, a single-user system, or a server computer orsimilar device that has little or no direct user interface but receivesrequests from other computer systems (clients). Further, in someembodiments, the computer system 601 may be implemented as a desktopcomputer, portable computer, laptop or notebook computer, tabletcomputer, pocket computer, telephone, smart phone, network switches orrouters, or any other appropriate type of electronic device.

It is noted that FIG. 6 is intended to depict the representative majorcomponents of an exemplary computer system 601. In some embodiments,however, individual components may have greater or lesser complexitythan as represented in FIG. 6, components other than or in addition tothose shown in FIG. 6 may be present, and the number, type, andconfiguration of such components may vary.

In some embodiments, a method comprises: reading a tape directory from acartridge memory of a tape cartridge in a first tape drive; seeking atarget record using the tape directory; storing physical positions of aplurality of different records that have been read during the seeking ina volatile memory of the first tape drive as a high resolution tapedirectory (HRTD); communicating the HRTD stored in the volatile memoryfor storage in an off-tape non-volatile memory prior to unloading thetape cartridge; and in response to the tape cartridge being loaded intothe tape drive, receiving the HRTD from the off-tape non-volatile memoryto the second tape drive.

In some embodiments of the method, the off-tape non-volatile memory ispart of a tape library. In some embodiments the method further comprisesexporting the HRTD from the off-tape non-volatile memory in response tothe tape cartridge being removed from the tape library. In someembodiments, the method further comprises discarding the HRTD in theoff-tape non-volatile memory based on the tape cartridge being removedfrom the tape library. In some embodiments, the discarding is furtherbased on a specified period of time elapsing since the tape cartridgewas removed from the tape library.

In some embodiments, the off-tape non-volatile memory is part of hostcomputing device.

In some embodiments, the method further comprises generating a hash codeusing tape specific information, wherein the hash code is communicatedwith the HRTD for storing in the off-tape non-volatile memory. In someembodiments, the hash code is received with the HRTD from the off-tapenon-volatile memory, and the method further comprises verifying the hashcode using tape specific information from the tape cartridge.

In some embodiments, a tape drive comprises: a memory including avolatile memory; and a controller coupled to the memory, the controllerconfigured to perform operations comprising: reading a tape directoryfrom a cartridge memory of a tape in a first tape drive; seeking atarget record using the tape directory; storing physical positions of aplurality of different records that have been read during the seeking inthe volatile memory as a high resolution tape directory (HRTD); storingthe HRTD stored in the volatile memory into an off-tape non-volatilememory; and in response to the tape being loaded into a second tapedrive, transmitting the HRTD from the off-tape non-volatile memory tothe second tape drive.

In some embodiments, the operations further comprise generating a hashcode using tape specific information, wherein the hash code iscommunicated with the HRTD for storage in the off-tape non-volatilememory. In some embodiments, the hash code is received with the HRTDfrom the off-tape non-volatile storage, and the operations furthercomprise verifying the hash code using tape specific information fromthe tape cartridge.

In some embodiments, a system comprises a memory containing programinstructions; and a processor coupled to the memory, the processorconfigured to execute the instructions to perform operations comprising:in response to receiving a tape cartridge eject request for a tapecartridge in a tape drive, requesting a high resolution tape directory(HRTD) from a volatile memory of the tape drive; and in response toreceiving the HRTD from the tape drive, storing the HRTD in anon-volatile memory. In some embodiments, the operations furthercomprise: receiving a tape cartridge insert request for inserting thetape cartridge into the tape drive; and sending the HRTD stored in thenon-volatile memory to the tape drive. In some embodiments, a hash codeis received with the HRTD from the tape drive and the hash code isstored in the non-volatile memory with the hash code.

In some embodiments, tape library comprises: a memory including anon-volatile memory; and a controller coupled to the memory, thecontroller configured to perform operations comprising: in response toreceiving a tape cartridge eject request for a tape cartridge in a tapedrive, requesting a high resolution tape directory (HRTD) from avolatile memory of the tape drive; and in response to receiving the HRTDfrom the tape drive, storing the HRTD in a non-volatile memory.

In some embodiments, the operations further comprise: receiving a tapecartridge insert request for inserting the tape cartridge into the tapedrive; and sending the HRTD stored in the non-volatile memory to thetape drive.

In some embodiments, a hash code is received with the HRTD from the tapedrive and the hash code is stored in the non-volatile memory with thehash code.

In some embodiments, the operations further comprise in response to thetape cartridge being removed from the tape library, discarding the HRTDfrom the non-volatile memory.

In some embodiments, the operations further comprise discarding the HRTDfrom the non-volatile memory in response to determining that a specifiedperiod of time has elapsed since the tape cartridge was removed from thetape library.

In some embodiments, the operations further comprise discarding the HRTDin response to the tape cartridge being removed from the tape libraryand determining that remaining free storage capacity in the non-volatilememory is below a threshold value.

In addition to embodiments described above, other embodiments havingfewer operational steps, more operational steps, or differentoperational steps are contemplated. Also, some embodiments may performsome or all of the above operational steps in a different order. Themodules are listed and described illustratively according to anembodiment and are not meant to indicate necessity of a particularmodule or exclusivity of other potential modules (or functions/purposesas applied to a specific module).

In the foregoing, reference is made to various embodiments. It should beunderstood, however, that this disclosure is not limited to thespecifically described embodiments. Instead, any combination of thedescribed features and elements, whether related to differentembodiments or not, is contemplated to implement and practice thisdisclosure. Many modifications and variations may be apparent to thoseof ordinary skill in the art without departing from the scope and spiritof the described embodiments. Furthermore, although embodiments of thisdisclosure may achieve advantages over other possible solutions or overthe prior art, whether or not a particular advantage is achieved by agiven embodiment is not limiting of this disclosure. Thus, the describedaspects, features, embodiments, and advantages are merely illustrativeand are not considered elements or limitations of the appended claimsexcept where explicitly recited in a claim(s).

The present invention may be a system, a method, and/or a computerprogram product. The computer program product may include a computerreadable storage medium (or media) having computer readable programinstructions thereon for causing a processor to carry out aspects of thepresent invention.

The computer readable storage medium can be a tangible device that canretain and store instructions for use by an instruction executiondevice. The computer readable storage medium may be, for example, but isnot limited to, an electronic storage device, a magnetic storage device,an optical storage device, an electromagnetic storage device, asemiconductor storage device, or any suitable combination of theforegoing. A non-exhaustive list of more specific examples of thecomputer readable storage medium includes the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a static random access memory (SRAM), a portablecompact disc read-only memory (CD-ROM), a digital versatile disk (DVD),a memory stick, a floppy disk, a mechanically encoded device such aspunch-cards or raised structures in a groove having instructionsrecorded thereon, and any suitable combination of the foregoing. Acomputer readable storage medium, as used herein, is not to be construedas being transitory signals per se, such as radio waves or other freelypropagating electromagnetic waves, electromagnetic waves propagatingthrough a waveguide or other transmission media (e.g., light pulsespassing through a fiber-optic cable), or electrical signals transmittedthrough a wire.

Computer readable program instructions described herein can bedownloaded to respective computing/processing devices from a computerreadable storage medium or to an external computer or external storagedevice via a network, for example, the Internet, a local area network, awide area network and/or a wireless network. The network may comprisecopper transmission cables, optical transmission fibers, wirelesstransmission, routers, firewalls, switches, gateway computers, and/oredge servers. A network adapter card or network interface in eachcomputing/processing device receives computer readable programinstructions from the network and forwards the computer readable programinstructions for storage in a computer readable storage medium withinthe respective computing/processing device.

Computer readable program instructions for carrying out operations ofthe present invention may be assembler instructions,instruction-set-architecture (ISA) instructions, machine instructions,machine dependent instructions, microcode, firmware instructions,state-setting data, or either source code or object code written in anycombination of one or more programming languages, including an objectoriented programming language such as Java, Smalltalk, C++ or the like,and conventional procedural programming languages, such as the “C”programming language or similar programming languages. The computerreadable program instructions may execute entirely on the user'scomputer, partly on the user's computer, as a stand-alone softwarepackage, partly on the user's computer and partly on a remote computeror entirely on the remote computer or server. In the latter scenario,the remote computer may be connected to the user's computer through anytype of network, including a local area network (LAN) or a wide areanetwork (WAN), or the connection may be made to an external computer(for example, through the Internet using an Internet Service Provider).In some embodiments, electronic circuitry including, for example,programmable logic circuitry, field-programmable gate arrays (FPGA), orprogrammable logic arrays (PLA) may execute the computer readableprogram instructions by utilizing state information of the computerreadable program instructions to personalize the electronic circuitry,in order to perform aspects of the present invention.

Aspects of the present invention are described herein with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems), and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer readable program instructions.

These computer readable program instructions may be provided to aprocessor of a general purpose computer, special purpose computer, orother programmable data processing apparatus to produce a machine, suchthat the instructions, which execute via the processor of the computeror other programmable data processing apparatus, create means forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks. These computer readable program instructionsmay also be stored in a computer readable storage medium that can directa computer, a programmable data processing apparatus, and/or otherdevices to function in a particular manner, such that the computerreadable storage medium having instructions stored therein comprises anarticle of manufacture including instructions which implement aspects ofthe function/act specified in the flowchart and/or block diagram blockor blocks.

The computer readable program instructions may also be loaded onto acomputer, other programmable data processing apparatus, or other deviceto cause a series of operational steps to be performed on the computer,other programmable apparatus or other device to produce a computerimplemented process, such that the instructions which execute on thecomputer, other programmable apparatus, or other device implement thefunctions/acts specified in the flowchart and/or block diagram block orblocks.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods, and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof instructions, which comprises one or more executable instructions forimplementing the specified logical function(s). In some alternativeimplementations, the functions noted in the block may occur out of theorder noted in the figures. For example, two blocks shown in successionmay, in fact, be accomplished as one step, executed concurrently,substantially concurrently, in a partially or wholly temporallyoverlapping manner, or the blocks may sometimes be executed in thereverse order, depending upon the functionality involved. It will alsobe noted that each block of the block diagrams and/or flowchartillustration, and combinations of blocks in the block diagrams and/orflowchart illustration, can be implemented by special purposehardware-based systems that perform the specified functions or acts orcarry out combinations of special purpose hardware and computerinstructions.

While the foregoing is directed to exemplary embodiments, other andfurther embodiments of the invention may be devised without departingfrom the basic scope thereof, and the scope thereof is determined by theclaims that follow. The descriptions of the various embodiments of thepresent disclosure have been presented for purposes of illustration butare not intended to be exhaustive or limited to the embodimentsdisclosed. Many modifications and variations will be apparent to thoseof ordinary skill in the art without departing from the scope and spiritof the described embodiments. The terminology used herein was chosen toexplain the principles of the embodiments, the practical application ortechnical improvement over technologies found in the marketplace, or toenable others of ordinary skill in the art to understand the embodimentsdisclosed herein.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the variousembodiments. As used herein, the singular forms “a,” “an,” and “the” areintended to include the plural forms as well, unless the context clearlyindicates otherwise. “Set of,” “group of,” “bunch of,” etc. are intendedto include one or more. It will be further understood that the terms“includes” and/or “including,” when used in this specification, specifythe presence of the stated features, integers, steps, operations,elements, and/or components, but do not preclude the presence oraddition of one or more other features, integers, steps, operations,elements, components, and/or groups thereof. In the previous detaileddescription of exemplary embodiments of the various embodiments,reference was made to the accompanying drawings (where like numbersrepresent like elements), which form a part hereof, and in which isshown by way of illustration specific exemplary embodiments in which thevarious embodiments may be practiced. These embodiments were describedin sufficient detail to enable those skilled in the art to practice theembodiments, but other embodiments may be used, and logical, mechanical,electrical, and other changes may be made without departing from thescope of the various embodiments. In the previous description, numerousspecific details were set forth to provide a thorough understanding thevarious embodiments. But, the various embodiments may be practicedwithout these specific details. In other instances, well-known circuits,structures, and techniques have not been shown in detail in order not toobscure embodiments.

The descriptions of the various embodiments of the present disclosurehave been presented for purposes of illustration, but are not intendedto be exhaustive or limited to the embodiments disclosed. Manymodifications and variations will be apparent to those of ordinary skillin the art without departing from the scope and spirit of the describedembodiments. The terminology used herein was chosen to explain theprinciples of the embodiments, the practical application or technicalimprovement over technologies found in the marketplace, or to enableothers of ordinary skill in the art to understand the embodimentsdisclosed herein.

What is claimed is:
 1. A method comprising: reading a tape directoryfrom a cartridge memory of a tape cartridge in a first tape drive;seeking a target record using the tape directory; storing physicalpositions of a plurality of different records that have been read duringthe seeking in a volatile memory of the first tape drive as a highresolution tape directory (HRTD); communicating the HRTD stored in thevolatile memory for storage in an off-tape non-volatile memory prior tounloading the tape cartridge; and in response to the tape cartridgebeing loaded into the tape drive, receiving the HRTD from the off-tapenon-volatile memory.
 2. The method of claim 1, wherein the off-tapenon-volatile memory is part of a tape library.
 3. The method of claim 2,further comprising exporting the HRTD from the off-tape non-volatilememory in response to the tape cartridge being removed from the tapelibrary.
 4. The method of claim 2, further comprising discarding theHRTD in the off-tape non-volatile memory based on the tape cartridgebeing removed from the tape library.
 5. The method of claim 4, whereinthe discarding is further based on a specified period of time elapsingsince the tape cartridge was removed from the tape library.
 6. Themethod of claim 1, wherein the off-tape non-volatile memory is part ofhost computing device.
 7. The method of claim 1, further comprisinggenerating a hash code using tape specific information, wherein the hashcode is communicated with the HRTD for storing in the off-tapenon-volatile memory.
 8. The method of claim 7, wherein the hash code isreceived with the HRTD from the off-tape non-volatile memory, the methodfurther comprising verifying the hash code using tape specificinformation from the tape cartridge.
 9. A tape drive comprising: amemory including a volatile memory; and a controller coupled to thememory, the controller configured to perform operations comprising:reading a tape directory from a cartridge memory of a tape in a firsttape drive; seeking a target record using the tape directory; storingphysical positions of a plurality of different records that have beenread during the seeking in the volatile memory as a high resolution tapedirectory (HRTD); storing the HRTD stored in the volatile memory into anoff-tape non-volatile memory; and in response to the tape being loadedinto a second tape drive, transmitting the HRTD from the off-tapenon-volatile memory to the second tape drive.
 10. The tape drive ofclaim 9, wherein the operations further comprise generating a hash codeusing tape specific information, wherein the hash code is communicatedwith the HRTD for storage in the off-tape non-volatile memory.
 11. Thetape drive of claim 10, wherein the hash code is received with the HRTDfrom the off-tape non-volatile memory, and wherein the operationsfurther comprise verifying the hash code using tape specific informationfrom the tape cartridge.
 12. A system comprising: a memory containingprogram instructions; and a processor coupled to the memory, theprocessor configured to execute the instructions to perform operationscomprising: in response to receiving a tape cartridge eject request fora tape cartridge in a tape drive, requesting a high resolution tapedirectory (HRTD) from a volatile memory of the tape drive; and inresponse to receiving the HRTD from the tape drive, storing the HRTD ina non-volatile memory.
 13. The system of claim 12, wherein theoperations further comprise: receiving a tape cartridge insert requestfor inserting the tape cartridge into the tape drive; and sending theHRTD stored in the non-volatile memory to the tape drive.
 14. The systemof claim 12, wherein a hash code is received with the HRTD from the tapedrive and the hash code is stored in the non-volatile memory with thehash code.
 15. A tape library comprising: a memory including anon-volatile memory; and a controller coupled to the memory, thecontroller configured to perform operations comprising: in response toreceiving a tape cartridge eject request for a tape cartridge in a tapedrive, requesting a high resolution tape directory (HRTD) from avolatile memory of the tape drive; and in response to receiving the HRTDfrom the tape drive, storing the HRTD in the non-volatile memory. 16.The tape library of claim 15, wherein the operations further comprise:receiving a tape cartridge insert request for inserting the tapecartridge into the tape drive; and sending the HRTD stored in thenon-volatile memory to the tape drive.
 17. The tape library of claim 15,wherein a hash code is received with the HRTD from the tape drive andthe hash code is stored in the non-volatile memory with the hash code.18. The tape library of claim 15, wherein the operations furthercomprise: in response to the tape cartridge being removed from the tapelibrary, discarding the HRTD from the non-volatile memory.
 19. The tapelibrary of claim 15, wherein the operations further comprise: discardingthe HRTD from the non-volatile memory in response to determining that aspecified period of time has elapsed since the tape cartridge wasremoved from the tape library.
 20. The tape library of claim 15, whereinthe operations further comprise: discarding the HRTD in response to thetape cartridge being removed from the tape library and determining thatremaining free storage capacity in the non-volatile memory is below athreshold value.